package com.un.ebs.inventory.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.un.ebs.inventory.domain.EntRelation;
import com.un.ebs.inventory.domain.EntRelationExt;
import com.un.ebs.inventory.dto.BusinessSupplyEntDto;
import com.un.ebs.inventory.dto.EntRelationApiHandlerDto;
import com.un.ebs.inventory.dto.EntRelationDto;
import com.un.ebs.inventory.dto.EntRelationUpdateDto;
import com.un.ebs.inventory.enums.BusinessRelationTypeEnum;
import com.un.ebs.sys.dto.EntAddDto;

import java.util.List;

/**
 * @author liubo
 * @email liubocs@163.com
 * @date 2020/5/28 11:42
 */
public interface BusinessRelationService {

    void addCustomer(EntAddDto req);

    void add(String name, BusinessRelationTypeEnum type);

    void addSupplier(EntAddDto req);

    void add(EntAddDto req, BusinessRelationTypeEnum type);

    void update(EntRelationUpdateDto req);

    void delete(String id);

    void setTempContractSend(String id);

    void setOpenApiUser(String id,String userId);

    void setApiHandler(String entRelationId, String apiId, String handlerCode);

    void deleteApiHandlerById(String id);

    String queryEntRelation(String entId);

    List<EntRelationApiHandlerDto> queryApiHandler(String entRelationId);

    EntRelationApiHandlerDto queryApiHandler(String apiId, String entId, BusinessRelationTypeEnum businessRelationTypeEnum);

    List<EntRelation> queryTempContractSend();

    IPage<EntRelationDto> query(String searchText, BusinessRelationTypeEnum type, int pageSize, int pageIndex);

    List<BusinessSupplyEntDto> querySupplyBySku(String skuId);

    EntRelationExt queryCustomerById(String entId);

    EntRelationExt querySupplierById(String entId);

    EntRelationExt queryByEnt(String entId);

    EntRelationExt queryById(String id);

    EntRelationApiHandlerDto queryApiHandlerById(String id);
}
